% This MATLAB .m file replicates Figures 4-8 in "Labor Market Conflict and
% the Decline of the Rust Belt" by Simeon Alder, David Lagakos, and Lee
% Ohanian.

% INSTRUCTIONS:
% 1. Create a folder on your computer and name it
% 'replicate_figures'.
% 
% 2. Download the following MATLAB files from the Harvard
% Dataverse website and save them in the 'replicate_figures' directory:
    % (a) plot_figure_4.m
    % (b) plot_figure_5.m
    % (c) plot_figure_6_and_8.m
    % (d) plot_figure_7.m

% 3. Download the following MATLAB workspaces from the Harvard
% Dataverse website and save them in the 'replicate_figures' directory:
    % (a) solution_model_BM.mat
    % (b) solution_model_CF_only_conflict.mat
    % (c) solution_model_CF_only_intl.mat
    % (d) solution_model_CF_neither.mat
    % (e) solution_model_CF_equally_bad.mat [?}

% 4. Download the following EXCEL spreadsheets from the Harvard
% Dataverse website and save them in the 'replicate_figures' directory:
    % (a) work_stoppages.xlsx
    % (b) emp_share_mfg.xlsx
    % (c) time_series_shares.xlsx
		
% 3. Set the MATLAB path (working directory) to the 'replicate_figures'
% directory (update line 42 of this .m file).
		
% 4. This .m file generates Figures 4-8 in the manuscript in both PDF and
% EPS file formats. Figures 1-3 in the manuscript are created by a separate
% STATA .do file.

% NOTE: Running this .m file will generate warnings about missing function
% handles. These function handles are not needed to re-produce the figures
% in the manuscript and the user can safely ignore the warnings.

% Set path (working directory):
% cd '/LOCALPATH/replicate_figures'
% cd '/Volumes/sdalder/Numerical/Rust Belt/Dataverse Sandbox/replicate_figures'

% Figure 4: Work Stoppages in Model and Data
plot_figure_4

% Figure 5: Import Shares in Model and Data
plot_figure_5

% Figure 6: Rust Belt's Decline in Model and Data
% and
% Figure 8: Decomposition of the Rust Belt's Decline
plot_figure_6_and_8

% Figure 7: Labor's Share of Value Added in Manufacturing
plot_figure_7

